﻿using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Xms.Abp.Data.Message;

namespace Xms.Abp.Smsing
{
    public abstract class TemplateSmsSenderProviderBase: ITemplateSmsSenderProvider
    {
        protected SmsSettings SmsSettings { get; }
        protected SupplierSmsSettings SupplierSmsSettings { get; }
        public TemplateSmsSenderProviderBase(
            SmsSettings smsSettings,
            SupplierSmsSettings supplierSmsSettings)
        {
            SmsSettings = smsSettings;
            SupplierSmsSettings = supplierSmsSettings;
        }
        public abstract string ProviderName { get; }

        public virtual bool IsEnabled => SupplierSmsSettings?.IsEnabled ?? false;

        public abstract Task<SentResult<SmsSentResultItem>> SendSmsAsync(SmsMessage smsMessage);
    }
}
